﻿<UserControl x:Class="VisualWip.SizeAndPositionAdornerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:vm="clr-namespace:VisualWip.PresentationModel;assembly=PresentationModel" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" Visibility="{Binding SizeAndPositionAdornerVisibility}" Width="{Binding ActualWidth}" Height="{Binding ActualHeight}">
    <Grid Opacity="10" >
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Thumb Grid.Row="0" Grid.Column="0"  Name="nwThumb" HorizontalAlignment="Left" VerticalAlignment="Top" PreviewMouseLeftButtonUp="NwThumb_OnPreviewMouseLeftButtonUp" DragDelta="nwThumb_DragDelta" Width="12" Height="12" Panel.ZIndex="1" Margin="-5,-5,0,0" />
        <Thumb Grid.Row="4" Grid.Column="0"  Name="swThumb" HorizontalAlignment="Left" VerticalAlignment="Bottom" PreviewMouseLeftButtonUp="SwThumb_OnPreviewMouseLeftButtonUp" DragDelta="swThumb_DragDelta"  Width="12" Height="12" Margin="-5,0,0,-5" d:LayoutOverrides="VerticalAlignment" />
        <Thumb Grid.Row="0" Grid.Column="4"  Name="neThumb" HorizontalAlignment="Right" VerticalAlignment="Top" PreviewMouseLeftButtonUp="NeThumb_OnPreviewMouseLeftButtonUp"  DragDelta="neThumb_DragDelta" Width="12" Height="12" Panel.ZIndex="1" Margin="0,-5,-5,0" />
		<Thumb Grid.Row="4" Grid.Column="4" Name="seThumb" HorizontalAlignment="Right" VerticalAlignment="Bottom" PreviewMouseLeftButtonUp="SeThumb_OnPreviewMouseLeftButtonUp"  DragDelta="seThumb_DragDelta" Width="12" Height="12" Margin="0,0,-5,-5"/>
        <Thumb Grid.Row="0" Margin="3.333,-26,2,0" Grid.Column="0" Grid.ColumnSpan="5"  Name="moveThumb" HorizontalAlignment="Stretch" VerticalAlignment="Top" PreviewMouseLeftButtonUp="MoveThumb_OnPreviewMouseLeftButtonUp"  DragDelta="moveThumb_DragDelta">
            <Thumb.Template>
                <ControlTemplate>
                      <Border BorderBrush="#FF858585" BorderThickness="1,1,1,0" Grid.ColumnSpan="5" Height="28" VerticalAlignment="Top" CornerRadius="10,10,0,0" >
                      	<Border.Background>
                      		<LinearGradientBrush EndPoint="1.007,0.525" MappingMode="RelativeToBoundingBox" StartPoint="0.027,0.501">
                      			<GradientStop Color="#7EACDEEF"/>
                      			<GradientStop Color="#7E87CEEB" Offset="1"/>
                      		</LinearGradientBrush>
                      	</Border.Background>
						
        		<Border BorderBrush="#32000000" BorderThickness="1,0,1,1" HorizontalAlignment="Right" Margin="0,0,6,5.334" Width="112.666">
        			
              <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="0,0,0,0" >              	
              	<Button Content="Settings" x:Name="settingsButton" Command="{Binding SettingsCommand}" HorizontalAlignment="Left" VerticalAlignment="Center" ToolTip="Edit Settings..." Margin="4,0,4,0">
              		<Button.Template>
              			<ControlTemplate>
              				<Image Source="/VisualWip;component/Images/OptionsHS.png" Width="16" Height="16" />
              			</ControlTemplate>
              		</Button.Template>
              	</Button>
              	<Border BorderBrush="#32000000" BorderThickness="1,0,0,0"/>
              		<Button Content="+" Command="{Binding ForwardCommand}"  x:Name="forwardButton" Margin="4,0,4,0" ToolTip="Bring to Front">
              			<Button.Template>
              				<ControlTemplate>
              					<Image Source="/VisualWip;component/Images/BringForwardHS.png" Width="16" Height="16" Margin="3" />
              				</ControlTemplate>
              			</Button.Template>
              		</Button>
					<Border BorderBrush="#32000000" BorderThickness="1,0,0,0"/>
              		<Button Content="-" Command="{Binding BackwardCommand}"  x:Name="backwardButton" Margin="4,0,4,0" ToolTip="Send to Back">
              			<Button.Template>
              				<ControlTemplate>
              					<Image Source="/VisualWip;component/Images/SendBackwardHS.png" Width="16" Height="16" Margin="3" />
              				</ControlTemplate>
              			</Button.Template>
              		</Button>
              	<Border BorderBrush="#32000000" BorderThickness="1,0,0,0"/>
              	<Button Content="Close" x:Name="closeButton" Margin="4,0,4,0"  Command="{Binding CloseCommand}" HorizontalAlignment="Right" VerticalAlignment="Center" ToolTip="Delete">
              		<Button.Template>
              			<ControlTemplate>
              				<Image Width="16" Height="16" Source="/VisualWip;component/Images/DeleteHS.png" />
              			</ControlTemplate>
              		</Button.Template>
              	</Button>
              </StackPanel>     			                     
        	</Border>
			
			</Border>
			
                </ControlTemplate>
            </Thumb.Template>
        </Thumb>      
    </Grid>
</UserControl>
